home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Resources / Chat & Communication / Digsby build 37 / digsby_setup.exe / lib / functools.pyo (.txt) < prev    next >
Python Compiled Bytecode  |  2008-10-13  |  837b  |  21 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.5)
  3.  
  4. from _functools import partial
  5. WRAPPER_ASSIGNMENTS = ('__module__', '__name__', '__doc__')
  6. WRAPPER_UPDATES = ('__dict__',)
  7.  
  8. def update_wrapper(wrapper, wrapped, assigned = WRAPPER_ASSIGNMENTS, updated = WRAPPER_UPDATES):
  9.     for attr in assigned:
  10.         setattr(wrapper, attr, getattr(wrapped, attr))
  11.     
  12.     for attr in updated:
  13.         getattr(wrapper, attr).update(getattr(wrapped, attr, { }))
  14.     
  15.     return wrapper
  16.  
  17.  
  18. def wraps(wrapped, assigned = WRAPPER_ASSIGNMENTS, updated = WRAPPER_UPDATES):
  19.     return partial(update_wrapper, wrapped = wrapped, assigned = assigned, updated = updated)
  20.  
  21.